package com.jgp.attachment.model;

import com.jgp.common.persistence.UUIDModel;
import com.jgp.common.annotation.UI;
import org.hibernate.annotations.Type;

import javax.persistence.*;

/**
 * 项目   parent
 * 作者   loufei
 * 时间   2018/4/27
 */
@UI
@Entity
@Table(name = "doc_file_info")
public class FileInfo extends UUIDModel {
    //文件真实名称
    @Column(name = "name",length = 100)
    private String name;
    //文件扩展名
    //文件真实名称
    @Column(name = "ext",length = 20)
    private String ext;
    //mime类型
    @Column(name = "mime_type",length = 100)
    private String mimeType;
    //文件类型
    @Column(name = "doc_type",length = 10)
    @Enumerated(EnumType.STRING)
    private DocType docType;
    //是否有缩略图
    @Type(type = "yes_no")
    @Column(name="has_thumb")
    private Boolean hasThumb;
    //md5
    @Column(name = "md5",length = 32)
    private String md5;
    //大小描述 KB MB GB
    @Column(name = "size_desc",length = 20)
    private String sizeDesc;
    //大小 字节(b)
    @Column(name = "size")
    private Long size;
    //访问路径
    @Column(name = "path")
    private String path;
    //磁盘上的物理名称
    @Column(name = "disk_name",length = 37)
    private String diskName;
    //磁盘上的物理目录
    @Column(name = "disk_dir")
    private String diskDir;
    //磁盘上的物理路径
    @Column(name = "disk_path")
    private String diskPath;
    //是否存在于ftp
    @Type(type = "yes_no")
    @Column(name="there_ftp")
    private Boolean thereFtp = false;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public DocType getDocType() {
        return docType;
    }

    public void setDocType(DocType docType) {
        this.docType = docType;
    }

    public Boolean getHasThumb() {
        return hasThumb;
    }

    public void setHasThumb(Boolean hasThumb) {
        this.hasThumb = hasThumb;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getSizeDesc() {
        return sizeDesc;
    }

    public void setSizeDesc(String sizeDesc) {
        this.sizeDesc = sizeDesc;
    }

    public Long getSize() {
        return size;
    }

    public void setSize(Long size) {
        this.size = size;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getDiskName() {
        return diskName;
    }

    public void setDiskName(String diskName) {
        this.diskName = diskName;
    }

    public String getDiskDir() {
        return diskDir;
    }

    public void setDiskDir(String diskDir) {
        this.diskDir = diskDir;
    }

    public String getDiskPath() {
        return diskPath;
    }

    public void setDiskPath(String diskPath) {
        this.diskPath = diskPath;
    }
    
    public Boolean getThereFtp() {
        return thereFtp;
    }
    
    public void setThereFtp(Boolean thereFtp) {
        this.thereFtp = thereFtp;
    }
}
